<script setup>

    import RSC from './RSC.vue';
    import {ref} from "vue"

    const data = ref([
        {sid: "s01",name: "Tom",age: "23"},
        {sid: "s02",name: "Jack",age: "24"},
        {sid: "s03",name: "Rose",age: "25"}
    ])


    function delDataAction(obj){
        const idx = data.value.indexOf(obj)
        data.value.splice(idx,1)
    }
</script>

<template>
    <hr/>
    <h3>以下为数据反向传递</h3>
    <RSC :data="data" @delData="delDataAction"  />
</template>
